function throttle(fn, time) {
    let flag = true;
    return function() {
        if (flag) {
            setTimeout(() => {
                fn.call(this)
                flag = true
            }, time)
            flag = false;
        }
    }
}